using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Threading;
using System.Windows.Forms;
using System.Net;
using System.IO;
using System.Xml;

namespace Armory
{
	public partial class Form1 : Form
	{
		public Form1()
		{
			InitializeComponent();
		}

		private void button1_Click(object sender, EventArgs e)
		{
			Character myChar = new Character("Illidan", "Morvas");
			TimeSpan myTime = TimeSpan.Parse("0:"+txtMin.Text+":"+txtSec.Text+"");
			//TimeSpan myTime = TimeSpan.Parse("0:01:00");
			Combat myCombat = new Combat(myChar, myTime);

			textBox1.AppendText(txtMin.Text + "m " + txtSec.Text + "s");
			textBox1.AppendText("AP:" + myChar.MeleeStats.AttackPower + "\r\n");

			myCombat.Start();

			Thread.Sleep(5000); // pause

			textBox1.AppendText("MH Hits\r\n");
			foreach(string mHHit in myCombat.MHHits)
			{
				textBox1.AppendText(mHHit + "\r\n");
			}

			textBox1.AppendText("\r\nOH Hits\r\n");
			foreach(string oHHit in myCombat.OHHits)
			{
				textBox1.AppendText(oHHit + "\r\n");
			}

			textBox1.AppendText("\r\nSpecial Attacks\r\n");

			foreach(string sHit in myCombat.SHits)
			{
				textBox1.AppendText(sHit + "\r\n");
			}

			textBox1.AppendText("\r\nEnergy Ticks\r\n");

			foreach(string energyTicks in myCombat.EnergyTicks)
			{
				textBox1.AppendText(energyTicks + "\r\n");
			}

			textBox1.AppendText("\r\n");

			myCombat.CalculateDPS();
			textBox1.AppendText("DPS: " + myCombat.Dps.ToString());
		}

		private void label1_Click(object sender, EventArgs e)
		{

		}
	}
}